<template>
  <div>
    <h1>Hello</h1>
    <h2>{{count}}</h2>
  </div>
</template>

<script>
import PubSub from "pubsub-js"

export default {
    name:"hello",
    data(){
        return{
            count:0
        }
    },
    mounted(){
    PubSub.subscribe("count", (_, count) => {
      this.count = count;
    });
    }
}
</script>

<style>

</style>